﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="Ait.Web.Templates.Calculator._default" MaintainScrollPositionOnPostback="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContentPlaceHolder" runat="server">

	 
<script>
    // alert("moo");
    $(document).ready(function() {

    $(".clearfix label[title]").tooltip(
        {
            position: "center center",
            offset: [0, 150]

        }
    );

});
    //var tapi = $("label.tooltipTrigger").data("tooltip");
        
</script> 
 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LcolContentPlaceHolder" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="RcolContentPlaceHolder" runat="server">

<div class="lcol">
    <acms:ImageContentControlDisplay ID="MainImage" ControlName="MainImage" CssClass="mainImage" runat="server" />    
    <div class="copy">
        <h1><acms:PostDisplayName ID="PostDisplayName" runat="server" /></h1>
        <acms:HtmlContentControlDisplay ID="acmsText" ControlName="MainCopy" runat="server" />
    </div>
    
    <div class="form">
    
        <div class="clearfix">
            <asp:Label AssociatedControlID="kwhCostTxt" runat="server" Text="kWh cost (pence)" CssClass="tooltipTrigger" ToolTip="Type in your kWh cost in pence here – if you don’t know what it is use the UK average of 8p" />
            <asp:RequiredFieldValidator ValidationGroup="vgCalculation" ID="kwhCostVal" CssClass="formError" runat="server" ControlToValidate="kwhCostTxt" Display="Dynamic" ErrorMessage="Please Enter A Number" />
            <%--<asp:RangeValidator ControlToValidate="kwhCostTxt" runat="server" MinimumValue="1" MaximumValue="10000" ErrorMessage="Error1"/>--%>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="kwhCostTxt" ErrorMessage="Please Enter Only Numbers"  ValidationExpression="^\d+$"  />
            <asp:TextBox runat="server" ID="kwhCostTxt" Text="8" CssClass="text"/>
        </div>
        <div class="clearfix">
            <asp:Label AssociatedControlID=rackDensityDdl runat="server" Text="Rack Density" CssClass="tooltipTrigger" ToolTip="Choose the option best describing the amount and type of equipment you have on average  in each rack – see below for definitions."/>
            <span style="visibility:hidden">*</span>              
            <asp:DropDownList ID="rackDensityDdl" runat="server">
                <asp:ListItem Text="Low Density" Value="1" />
                <asp:ListItem Text="Medium Density" Value="2.5" />
                <asp:ListItem Text="High Density" Value="5" />
                <asp:ListItem Text="Very High Density" Value="10" />
            </asp:DropDownList>
        </div>
        <div class="clearfix">
        
            <asp:Label ID="numberOfRackLbl" AssociatedControlID="numberOfRackTxt" runat="server" CssClass="tooltipTrigger" Text="Number Of Racks" ToolTip="Include all the racks in your data centre with live equipment installed." />
            <asp:RequiredFieldValidator ID="numberOfRackVal" ValidationGroup="vgCalculation" CssClass="formError" runat="server" ControlToValidate="numberOfRackTxt" Display="Dynamic" ErrorMessage="Please Enter A Number" />
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="numberOfRackTxt" ErrorMessage="Please Enter Only Numbers"  ValidationExpression="^\d+$" />
            <%--<asp:RangeValidator ID="RangeValidator1" ControlToValidate="numberOfRackTxt" runat="server" MinimumValue="1" MaximumValue="10000" ErrorMessage="Error" />--%>
            <asp:TextBox runat="server" ID="numberOfRackTxt" Text="" CssClass="text"/>
        
        </div>
        <div class="clearfix">
        
            <asp:Button ID="btnSubmit" ValidationGroup="vgCalculation" runat="server" Text="Calculate" />
            
        </div>
    </div>
    
    <asp:Panel ID="resultsPnl" CssClass="resultsPnl clearfix" runat="server" Visible="false">
        
            
            <div id="EstimatedYearlyCost" style="">
                <p class="shout">Estimated Yearly Cost:</p>
                <ul id="estimatedCosts">
                <li id="Inefficient"><asp:Label ID="inefficientLbl" runat="server" /> </li>
                <li id="Average"><asp:Label ID="averageLbl" runat="server" /> </li>
                <li id="Efficient"><asp:Label ID="efficientLbl" runat="server" /> </li>
                </ul>
            </div>
            
            <div id="YouCouldSave" style="">
                <p class="shout">You Could Save:</p>
                <asp:Label ID="savingLbl" CssClass="savingLbl" runat="server" />
                <p>Potential yearly saving from an audit if efficiency recommendations are implemented.</p>
            </div>
    
    </asp:Panel>
    
    <asp:Panel ID="createMsgPnl" Visible="false" CssClass="form createMsgPnl" runat="server">
    <p style="color:red; font-weight:bold">Contact the AIT Data Centre Efficiency Team using the form below and let us identify your cost savings. We will also send you a summary of your potential savings.</p>
    <div class="form">
        <div class="clearfix">
            <asp:Label AssociatedControlID="nameTxt" ID="Label1" runat="server" Text="Name:" />
            <asp:RequiredFieldValidator ValidationGroup="vgEmail" ID="RequiredFieldValidator1" CssClass="formError" runat="server" ControlToValidate="nameTxt" Display="Dynamic" ErrorMessage="Please Check" />
            <asp:TextBox ID="nameTxt" runat="server" CssClass="text" />
        </div>
        <div class="clearfix">
            <asp:Label AssociatedControlID="copmanyTxt" ID="Label2" runat="server" Text="Company:" />
            <asp:RequiredFieldValidator ValidationGroup="vgEmail" ID="RequiredFieldValidator3" CssClass="formError" runat="server" ControlToValidate="copmanyTxt" Display="Dynamic" ErrorMessage="Please Check" />
            <asp:TextBox ID="copmanyTxt" runat="server" CssClass="text" />
        </div>
        <div class="clearfix">
            <asp:Label AssociatedControlID="phoneTxt" ID="Label3" runat="server" Text="Phone:" />
            <asp:RequiredFieldValidator ValidationGroup="vgEmail" ID="RequiredFieldValidator4" CssClass="formError" runat="server" ControlToValidate="phoneTxt" Display="Dynamic" ErrorMessage="Please Check" />
            <asp:TextBox ID="phoneTxt" runat="server" CssClass="text" />
        </div>
    
        <div class="clearfix">
            <asp:Label AssociatedControlID="emailTxt" ID="emailLbl" runat="server" Text="Email:" />
            <asp:RegularExpressionValidator ID="valEmailFormat" ControlToValidate="emailTxt"  CssClass="formError" ErrorMessage="Invalid Email" Display="Dynamic" runat="server" ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" />
            <asp:RequiredFieldValidator ValidationGroup="vgEmail" ID="RequiredFieldValidator2" CssClass="formError" runat="server" ControlToValidate="emailTxt" Display="Dynamic" ErrorMessage="Please Check" />
            <asp:TextBox ID="emailTxt" runat="server" CssClass="text" />
        </div>
        <div class="clearfix">
            <asp:Button ID="btnSendEmail" ValidationGroup="vgEmail" Text="Email Savings" runat="server" />
        </div>
    </div>
        
    </asp:Panel>
    <asp:Panel ID="MessageSentPnl" CssClass="createMsgPnl" Visible="false" runat="server">
        <p style="color:red; font-weight:bold">Thanks for contacting the AIT Data Centre Efficiency Team. We will contact you within 1 business day to help identify where you can make cost savings in your Data Centre(s). Nearly everyone can make savings that pay for themselves over 12 months. Alternatively please ring us on 0845 017 7017.</p>
    </asp:Panel>
    <asp:Panel ID="MessageErrorPnl" CssClass="createMsgPnl" Visible="false" runat="server">
        <p style="color:red; font-weight:bold">Error Sending Email!</p>
    </asp:Panel>
    
    
    <acms:HtmlContentControlDisplay runat="server" ControlName="AssumptionCopy" CssClass="AssumptionCopy" ID="AssumptionCopy" />
    
    
    <acms:TextContentControlDisplay ID="MainColInlineCode" ControlName="MainColInlineCode" runat="server" />
    
</div>
<div class="rcol">
    
</div>
</asp:Content>